import javax.swing.JPanel;
import java.awt.FlowLayout;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


public class PatientGUI extends JPanel {
    int location;
    public PatientGUI() {
        setLayout(null);
        
        JButton btnRequestAppointment = new JButton("Request Appointment");
        btnRequestAppointment.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                location = 14;
            }
        });
        btnRequestAppointment.setBounds(10, 11, 160, 23);
        add(btnRequestAppointment);
        
        JButton btnNewButton = new JButton("View Medical History");
        btnNewButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                location = 20;
            }
        });
        btnNewButton.setBounds(10, 54, 160, 23);
        add(btnNewButton);
        
        JButton btnLogout = new JButton("Logout");
        btnLogout.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                location = -1;
            }
        });
        btnLogout.setBounds(10, 266, 89, 23);
        add(btnLogout);
        
        JButton btnViewDoctorsOrders = new JButton("View Doctors Orders");
        btnViewDoctorsOrders.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                location = 5;
            }
        });
        btnViewDoctorsOrders.setBounds(10, 88, 160, 23);
        add(btnViewDoctorsOrders);
    }
    
    
    public int getLoc(){
        return location;
    }
    
    public void setLoc(int i){
        location = i;
    }
}
